import { IUser } from "./user";
// 好友添加情况
export enum FriendState {
  wait = 0,
  aggre = 1,
  reject = 2,
}

// 好友在线状态
export enum FriendStatus {
  off = 0,
  online = 1,
}

export enum RightContentStatus {
  empty = 0,
  friendDetail = 1,
  groupDetail = 2,
  notifyRequest = 3,
}

export enum ShowFriendListModal {
  add = 0,
  edit = 1,
}

interface IShowFriendListModal {
  friendGroupId: number | null;
  status: boolean;
  type: ShowFriendListModal;
}

interface IRequestListItem {
  createdAt: string;
  requestId: number;
  receiverId: number;
  status: number;
  description: string;
  Request: IUser;
  Receiver: IUser;
}

interface IFriendListItem extends IUser {
  groupId: number;
  sessionId: string;
}

interface ISearchFriendItem {
  id: number;
  uuid: string;
  name: string;
  avatar: string;
  sign: string;
  status: number;
}

interface IAddFriendPayload {
  friendId: number;
  msg: string;
}

interface IFriendInfo {
  sessionId: string;
  user: IUser;
}

interface IFriendInfoCardParams {
  name: string;
  bgImage: string;
  des: string;
  avatar: string;
}

interface ICandidateFriendListItem {
  id: number;
  name: string;
  avatar: string;
  select: boolean;
}

interface IFriendGroupItem {
  id: number;
  userId: number;
  name: string;
  isDefault: boolean;
}

interface IUpdateFriendGroupParams {
  id: number;
  name: string;
}

interface IChangeFriendGroupParams {
  friendId: number;
  groupId: number;
}

interface IFriendGroupByUser {
  name: string;
  id: Number;
  isDefault: boolean;
  users: IFriendListItem[];
}

interface IFriendGroupWorkData {
  friendGroupList: IFriendGroupItem[];
  friendList: IFriendListItem[];
}

export type {
  IFriendListItem,
  ISearchFriendItem,
  IAddFriendPayload,
  IRequestListItem,
  IFriendInfo,
  IFriendInfoCardParams,
  ICandidateFriendListItem,
  IFriendGroupItem,
  IShowFriendListModal,
  IUpdateFriendGroupParams,
  IChangeFriendGroupParams,
  IFriendGroupByUser,
  IFriendGroupWorkData,
};
